home *** CD-ROM | disk | FTP | other *** search
/ Aminet 13 / Aminet 13 - August 1996.iso / Aminet / game / misc / DiamondGfx1_1.lha / Gfx1.1 / InstallGfx < prev    next >
Text File  |  1996-05-14  |  5KB  |  202 lines

  1. ; $VER InstallGfx 1.1l (14.05.96)
  2.  
  3. (if (> (exists ("env:Language")) 0) (set lanfound (getenv "Language")) )
  4. (set lan 0)
  5. (set #lanQuestion "Please select language:")
  6. (set #nohelp "Sorry, no help-text.")
  7. (if (= "deutsch" lanfound)
  8.     (
  9.         (set lan 1)
  10.         (set #lanQuestion "Bitte Sprache auswählen:")
  11.         (set #nohelp "Sorry, kein help-text.")
  12.     )
  13. )
  14.  
  15. (set Update 0)
  16. (set version 0)
  17. (set DrawerName "DC:")
  18.  
  19. (complete 0)
  20. (set lan  (askchoice (choices "English" "Deutsch"
  21.                          (prompt #lanQuestion)
  22.                          (help #nohelp)
  23.                          (default lan)
  24.                      )
  25.           )
  26. )
  27.  
  28. (set #normal "normal")
  29. (set #mwb1 "MagicWB (1)")
  30. (set #mwb2 "MagicWB (2)")
  31. (set #rare "RareDiamond")
  32.  
  33. (if (= lan 0)
  34.     (
  35.         (set #alreadyinstalled "You have already installed a version greater or equal 1.1!\n")
  36.         (set #oldversion "You have already installed an older version of Diamond Gfx.\nDo you want to update or install completely new?")
  37.         (set #installnew "Install new")
  38.         (set #update "Update")
  39.         (set #copy "Copying..." )
  40.         (set #guidesource "english/DiamondGfx.guide")
  41.         (set #whaticons "What kind of Icons do you want?")
  42.         (set #noicons "none")
  43.         (set #nodc "Directory DC: not found!\nYou need an installed Version of Diamond Caves to run Diamond Gfx.")
  44.         (set #end "\nDiamond Gfx V1.1 installation/update complete.\n\nHave fun!")
  45.     )
  46.     (
  47.         (set #alreadyinstalled "Es ist schon eine Version größer oder gleich V1.1 installiert!")
  48.         (set #oldversion "Es ist schon eine ältere Version von Diamond Gfx installiert.\nWollen Sie dieVersion erneuern oder alles komplett neu installieren?")
  49.         (set #installnew "neu installieren")
  50.         (set #update "erneuern")
  51.         (set #copy "Kopiere..." )
  52.         (set #guidesource "deutsch/DiamondGfx.guide")
  53.         (set #whaticons "Was für Icons möchten Sie?")
  54.         (set #noicons "keine")
  55.         (set #nodc "Konnte Directory DC: nicht finden!\nEs muß eine installierte Version von Diamond Caves vorhanden sein!")
  56.         (set #end "\nDiamond Gfx V1.1 fertig installiert/erneuert.\n\nViel Spaß!")
  57.     )
  58. )
  59.  
  60. (if (exists "DC:" (NOREQ))
  61.     (
  62.  
  63.         (if (exists "DC:DiamondGfx" (NOREQ))
  64.             (
  65.                 (set vernum (getversion "DC:DiamondGfx"))
  66.  
  67.                 (set ver (/ vernum 65536))
  68.                 (set rev (- vernum (* ver 65536)))
  69.  
  70.                 (set version (+ (* 100 ver) rev))
  71.  
  72.                 (if (> version 100)
  73.                     (
  74.                         (message #alreadyinstalled)
  75.                         (exit (quiet))
  76.                     )
  77.                 )
  78.  
  79.                 (set Update
  80.                     (askchoice
  81.                         (prompt #oldversion)
  82.                         (choices #installnew #update)
  83.                         (help #nohelp)
  84.                         (default 1)
  85.                     )
  86.                 )
  87.             )
  88.         )
  89.     )
  90.     (
  91.         (message #nodc)
  92.         (exit (quiet))
  93.     )
  94. )
  95.  
  96. (if (= Update 1)                  ; only Update according to present Version
  97.     (
  98.         (complete 30)
  99.         (if (< version 100)         ; this is only for versions <1.0
  100.             (copyfiles
  101.                 (prompt #copy)
  102.                 (help @copyfiles-help)
  103.                 (source "new")
  104.                 (dest DrawerName)
  105.                 (all)
  106.             )
  107.         )
  108.  
  109.         (complete 50)
  110.         (if (< version 102)         ; this is only for versions <1.2 (main prg)
  111.             (copyfiles
  112.                 (prompt #copy)
  113.                 (help @copyfiles-help)
  114.                 (source "UpdateFromV1.0-1.1")
  115.                 (dest DrawerName)
  116.                 (all)
  117.             )
  118.         )
  119.  
  120.     )
  121.  
  122.     (                             ; new install: copy everything to "DrawerName" (should be "DC:" !)
  123.         (complete 10)
  124.         (set icons
  125.             (askchoice
  126.                 (prompt #whaticons)
  127.                 (choices #normal #mwb1 #mwb2 #rare #noicons)
  128.                 (help #nohelp)
  129.                 (default 0)
  130.             )
  131.         )
  132.  
  133.         (if (= icons 0)
  134.             (set IconName "Icons/normal")
  135.         )
  136.         (if (= icons 1)
  137.             (set IconName "Icons/MagicWB1")
  138.         )
  139.         (if (= icons 2)
  140.             (set IconName "Icons/MagicWB2")
  141.         )
  142.         (if (= icons 3)
  143.             (set IconName "Icons/RareDiamond")
  144.         )
  145.  
  146.         (if (<> icons 4)
  147.             (
  148.                 (copyfiles
  149.                     (prompt #copy)
  150.                     (help #nohelp)
  151.                     (source IconName)
  152.                     (dest DrawerName)
  153.                     (pattern "DiamondGfx#?")
  154.                     (infos)
  155.                 )
  156.             )
  157.         )
  158.  
  159.         (complete 30)
  160.         (copyfiles
  161.             (prompt #copy)
  162.             (help #nohelp)
  163.             (source "new")
  164.             (dest DrawerName)
  165.             (all)
  166.             (infos)
  167.         )
  168.  
  169.         (complete 50)
  170.         (copyfiles
  171.             (prompt #copy)
  172.             (help @copyfiles-help)
  173.             (source "UpdateFromV1.0-1.1")
  174.             (dest DrawerName)
  175.             (all)
  176.         )
  177.  
  178.     )
  179. )
  180.  
  181. (complete 70)
  182. (copyfiles                  ; new guide
  183.     (prompt #copy)
  184.     (help #nohelp)
  185.     (source #guidesource)
  186.     (dest DrawerName)
  187. )
  188.  
  189. (complete 80)
  190. (copyfiles                  ; Catalogs
  191.     (prompt #copy)
  192.     (help #nohelp)
  193.     (source "locale")
  194.     (dest DrawerName)
  195.     (all)
  196. )
  197.  
  198. (complete 100)
  199. (message #end)
  200.  
  201. (exit (quiet))
  202.